﻿<Page
    x:Class="VentureClient.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:VentureClient"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">
    <Page.TopAppBar>
        <CommandBar Name="TopBar">
            <CommandBar.Content>
                <Grid/>
            </CommandBar.Content>
            <AppBarButton Icon="OpenPane" Label="Open Stock File" Command="{Binding OpenStockFileCommand}"/>
            <AppBarButton Icon="OpenLocal" Label="Open Expert File" Command="{Binding OpenExpertFileCommand}"/>
        </CommandBar>
    </Page.TopAppBar>
    <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
        <Grid.RowDefinitions>
            <RowDefinition Height="30"></RowDefinition>
            <RowDefinition Height="30"></RowDefinition>
            <RowDefinition></RowDefinition>
            <RowDefinition Height="30"></RowDefinition>
            <RowDefinition></RowDefinition>
            <RowDefinition Height="30"></RowDefinition>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="40"/>
            <ColumnDefinition/>
            <ColumnDefinition Width="40"/>
        </Grid.ColumnDefinitions>
        <StackPanel Orientation="Horizontal" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2">
            <TextBlock x:Name="textBlock" HorizontalAlignment="Left" VerticalAlignment="Center" TextWrapping="Wrap" Text="Stock Code:"/>
            <TextBox x:Name="StockCode" BorderThickness="0" HorizontalAlignment="Left"
                     VerticalAlignment="Center" TextWrapping="Wrap" IsReadOnly="True"/>
            <CheckBox IsChecked="{Binding IsShowingCross, Mode=TwoWay}">Show Cross</CheckBox>
        </StackPanel>
        <StackPanel Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2" Orientation="Horizontal"
                    HorizontalAlignment="Right">
            <Button Command="{Binding ZoomInCommand}">+</Button>
            <Button Command="{Binding ZoomResetCommand}">R</Button>
            <Button Command="{Binding ZoomOutCommand}">-</Button>
        </StackPanel>
        <Canvas Grid.Row="1" Grid.RowSpan="5" Grid.Column="0" Grid.ColumnSpan="3" Background="LightBlue" Name="MainCanvas"
                SizeChanged="MainCanvasOnSizeChanged" PointerMoved="MainCanvasOnPointerMoved"></Canvas>
        <Button Grid.Row="3" Grid.Column="0" Command="{Binding GoLeftCommand}">&lt;</Button>
        <Button Grid.Row="3" Grid.Column="2" Command="{Binding GoRightCommand}">&gt;</Button>
        <Button Grid.Row="5" Grid.Column="0" Command="{Binding GoLeftmostCommand}">|&lt;</Button>
        <Button Grid.Row="5" Grid.Column="2" Command="{Binding GoRightmostCommand}">&gt;|</Button>
    </Grid>
</Page>
